require 'benchmark'

N = 100_000

FMT = "%s AND NOT (%s) COPY %s".freeze

Benchmark::bm(20) do |x|
  
  a, b, c = 1323, "xxxxxxxxxxxxxxxxxxxxxxxxxxxx", :best_of_luck

  x.report('% operator') do
    N.times { FMT % [a, b, c] }
  end

  x.report('literal string') do
    N.times { "#{a} AND NOT (#{b}) COPY #{c}" }
  end
end